package center.leon.zoofeignapi.service;

import center.leon.zoocommon.common.Response;
import center.leon.zoofeignapi.dto.Monkey;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author : Leon on XXM Mac
 * @since : create in 2024/8/19 14:48
 */
@ResponseBody
@RestController
@FeignClient(value = "zoo-feign-api", contextId = "ZooMonkeyServiceApi")
public interface ZooMonkeyServiceApi {

    /**
     * get by id
     * @param id
     * @return
     */
    @GetMapping(value = "/monkey/{id}")
    Response<Monkey> getMonkeyById(@PathVariable(value = "id") Long id);
}
